#ifndef CHARACTER_H_
#define CHARACTER_H_

#include <GL/gl.h>
#include <SDL/SDL.h>

#include "KeyListener.h"
#include "CubePileFeature.h"
#include "Pattern.h"
#include "CubePile.h"
#include "CubePileGrid.h"
#include "Animatable.h"

class Character : public CubePileFeature, public Animatable 
{
	CubePileGrid * world;
	CubePile * currentPile;
	GLuint characterTexture, speachTexture;
	int mouseX, mouseY;
	bool renderSpeachBubble;
public:
	Pattern * pattern;
	Character(GLuint aCharTexture, GLuint aSpeachTexture, Pattern * aPattern, CubePileGrid * theWorld);
	virtual ~Character(){};
	virtual void render();
	virtual void handleMouseClickEvent();
	virtual void setYPos(int y);
	virtual void animate(float timeD);
	void moveTo(int x, int z);
	virtual void patternCompleted(Pattern * aPattern);
};

#endif /*CHARACTER_H_*/
